#choose your toolchain
#cross compile should change this option
CC=g++
#compile option  gdb:-g
CFLAGS=  -g
#target name 
TARGET=test_file

LINK_OPTION=-lpthread
SRCS = main.cpp 
 
INC =

OBJS = $(SRCS:.cpp=.o)

$(TARGET):$(OBJS)
#	@echo TARGET:$@
#	@echo OBJECTS:$^
	$(CC) -o $@ $^ $(LINK_OPTION)
	@echo "\033[32m>cmompile done.\033[0m"
	@echo "\n\033[34m>finish\033[0m"
%.o:%.cpp
	$(CC) $(CFLAGS) $(INC) -o $@ -c $< 
	
.PHONY:clean
clean:
	rm -rf $(TARGET) $(OBJS)
	@echo "\033[33mclean done\033[0m"